import axios from '@/utils/axios'

const indexCommodyURL = '/commodity/index'
const getCommodyByCategoryURL = '/commodity/getCommodityByCategory/'
const getCommodyByStoreIdURL = '/commodity/getCommodityByStoreId/'

const commodity = {
    getIndexCommodity: function(){
        return axios.get(indexCommodyURL)
    },
    getCommodityByCategory: function(categoryId){
        return axios.get(getCommodyByCategoryURL + categoryId)
    },
    getCommodityByStoreId: function(storeId){
        return axios.get(getCommodyByStoreIdURL + storeId)
    }
}

export default commodity